mypy error when mapping a list of values to float